package com.supreme.orderserver.service.remote;

import com.supreme.common.constant.ServiceConst;
import com.supreme.commonboot.utils.AjaxResp;
import com.supreme.commonentity.mysql.primary.MBTest;
import com.supreme.commonmybatis.entity.primary.MBStorage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @FeignClient
 * value: 注册到nacos的服务名
 */
@FeignClient(value = ServiceConst.SIMPLE_NAME)
public interface SimpleService {

    @PostMapping(value = "/api/seata/createStorage")
//    @RequestLine(value = "POST /api/seata/createStorage")
    MBStorage createStorage(MBStorage storage);

    @GetMapping(value = "/api/seata/test")
//    @RequestLine(value = "GET /api/seata/test")
    AjaxResp test();

    @PostMapping(value = "/api/test/create")
//    @RequestLine(value = "POST /api/test/create")
    AjaxResp testCreate(MBTest test);
}
